package com.hz.web.controller;

import com.alibaba.fastjson.JSON;
import com.hz.web.entity.Notify;
import com.hz.web.entity.SysSpec;
import com.hz.web.service.SysSpecService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * Created by kaddddd on 2018/5/15 0015.
 */
@Controller
public class SysSpecController {
    @Autowired
    private SysSpecService sysSpecService;

    @RequestMapping("/selectAllSpec")
    public @ResponseBody
    String selectAllSpec(ModelMap model){
        List<SysSpec> list = sysSpecService.selectAllSpec();
        String sheetList = JSON.toJSONString(list);
        return sheetList;
    }
}
